<!DOCTYPE html>
<style id="style">
#target::first-line { color: green }
</style>
<script>
document.getElementById('style').disabled = true;
</script>
<div id="target">This text should be green.</div>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<script>
runAfterLayoutAndPaint(function() {
  document.getElementById('style').disabled = false;
}, true);
</script>
